package com.example.design.b.flyweight;

/**
 * 具体享元
 */
public class Circle implements Shape {

    private String color;

    // 非享元属性
    private int x;
    private int y;
    private int radius;

    @Override
    public void draw() {
        System.out.println("Circle[" + color + ", x=" + x + ", y=" + y + ", radius=" + radius + "]");
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getRadius() {
        return radius;
    }

    public void setRadius(int radius) {
        this.radius = radius;
    }
}
